/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright (c) 2023-present Kaleidos INC
*/

@import url("tools/typography.css");

.strength {
  align-items: center;
  display: flex;
  padding-block-end: var(--spacing-8);
}

.strength-bar {
  display: flex;
}

.step {
  background-color: var(--color-gray30);
  block-size: 6px;
  border-radius: 6px;
  inline-size: 64px;
  margin-inline-end: var(--spacing-8);
}

.strength-0,
.strength-1 {
  color: var(--color-red80);

  & .weak {
    background-color: var(--color-red60);
  }
}

.strength-2 {
  color: var(--color-warning80);

  & .weak,
  & .medium {
    background-color: var(--color-warning50);
  }
}

.strength-3 {
  color: var(--color-ok80);

  & .weak,
  & .medium,
  & .strong {
    background-color: var(--color-ok50);
  }
}

.password-strength-text {
  font-size: var(--font-size-small);
}

.password-help {
  @mixin font-small;

  color: var(--color-gray90);
  margin-block-end: var(--spacing-8);
  padding-inline: var(--spacing-4);
}

.errors {
  @mixin font-small;

  color: var(--color-red80);
  font-weight: var(--font-weight-regular);
  line-height: 1;
  padding-inline-start: var(--spacing-4);

  & .warning {
    aspect-ratio: 1/1;
    block-size: var(--spacing-16);
    inline-size: var(--spacing-16);
    margin-inline-end: var(--spacing-4);
  }

  & .help {
    align-items: center;
    display: flex;
    margin-block-end: var(--spacing-4);
  }

  & .error-list {
    list-style: "•";
    margin-block-end: var(--spacing-16);
    padding-inline-start: var(--spacing-28);

    & li {
      padding-block-end: 0;
      padding-inline-start: var(--spacing-4);
    }
  }
}
